package com.jk.youxuanmall.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回结果枚举
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(400, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    TOKEN_EXPIRED(4011, "令牌已过期"),
    TOKEN_INVALID(4012, "无效的令牌"),
    FORBIDDEN(403, "没有相关权限"),
    ACCOUNT_DISABLED(4031, "账号已被禁用"),
    ACCOUNT_LOCKED(4032, "账号已被锁定"),
    NOT_FOUND(404, "资源不存在");

    private final int code;
    private final String msg;
}
